package com.carl.zeus.model.system;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import com.carl.zeus.util.IdEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.Date;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author carl
 * @since 2017-02-13
 */
@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
@TableName("sys_menu")
public class SysMenu extends IdEntity<SysMenu> {

    private static final long serialVersionUID = 1L;

    @TableField(exist = false)
    private String parentName;
    @TableField(value = "parent_id")
    private Long parentId;
    @TableField(value = "menu_level")
    private Integer menuLevel;
	private String name;
	private String url;
    private String perms;
    private Integer type;
    private String icon;
    private Integer sort;
    private Integer status;
    private String remark;

    @JSONField(format="yyyy-MM-dd HH:mm:ss")
	@TableField(value = "create_time")
	private Date createTime;

    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    @TableField(value = "update_time")
    private Date updateTime;

    /**
     * ztree属性
     */
    @TableField(exist=false)
    private Boolean open;

    @TableField(exist=false)
    private List<?> children;

    public String getParentName() {
        return parentName;
    }
}
